package com.ymt.bpm.service.engine.task;

import com.alibaba.fastjson.JSONObject;
import com.ymt.bpm.model.PTaskTodo;
import org.xml.sax.SAXException;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.xpath.XPathExpressionException;
import java.io.IOException;

/**
 * Created by Johnny on 2017/4/17.
 */
public interface PiService {

    //JSONObject startProcess(String tenantId, String bpdId, String vId, String parentPiid, String userId, String displayName, String titile, JSONObject variables);

    JSONObject get(String tenantId, String piEid, String lang, int timezoneOffset);

    JSONObject startProcessByDraft(String tenantId, PTaskTodo todo, JSONObject bpmnConfig, JSONObject pijo);

    JSONObject statePi(String tenantId, String loginName, String displayName, String piId, String newStatus);

    JSONObject statePiToHi(String tenantId, String loginName, String displayName, String piId, String newStatus, String deleteReason);

    JSONObject stateHi(String tenantId, String loginName, String displayName, String piId, String newStatus);

    JSONObject startDraft(String tenantId, String loginName, String displayName, String bpdId);

    JSONObject getByCallActivityId(String tenantId, String piId, String parentPiEid, String callActivityId, String lang, int timezoneOffset);

    JSONObject infoForChange(String tenantId, String piEid, String lang, int timezoneOffset);

    JSONObject saveDynamicChange(String tenantId, String loginName, String displayName, String piEid, String param) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException, TransformerException;

}
